﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UIListGrid.ascx.cs" 

Inherits="UILGestion.VentaAdmin.UI.UIListGrid" %>


<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>

<asp:Panel runat="server" ID="PanelRecepcion" >
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" class="ms-crm-List-Header">
            <tr id="Tr1" runat="server">
               
                           
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="codigo" runat="server" ForeColor="Blue">CUH</asp:LinkButton>
                </th>
                 <th id="Th8" runat="server">
                    <asp:LinkButton ID="LinkButton6" CommandName="Sort" CommandArgument="tipoViviendaStr" runat="server" ForeColor="Blue">TIPO UI</asp:LinkButton>
                </th>

                  <th id="Th9" runat="server">
                    <asp:LinkButton ID="LinkButton7" CommandName="Sort" CommandArgument="descripcion" runat="server" ForeColor="Blue">Nro LOTE /DPTO</asp:LinkButton>
                </th>
                

                <th id="Th1" runat="server">
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" CommandArgument="localizacionStr" runat="server" ForeColor="Blue">LOCALIZACION</asp:LinkButton>
                </th>

              
                
                  <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="etapaStr" runat="server" ForeColor="Blue">ETAPA</asp:LinkButton>
                </th>
                <th id="Th6" runat="server">
                    <asp:LinkButton ID="LinkButton8" CommandName="Sort" CommandArgument="numPartida" runat="server" ForeColor="Blue">ESTADO</asp:LinkButton>
                </th>
                 <th id="Th11" runat="server">
                    <asp:LinkButton ID="LinkButton11" CommandName="Sort" CommandArgument="tipoModeloStr" runat="server" ForeColor="Blue">MODELO</asp:LinkButton>
                </th>
                
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton9" CommandName="Sort" CommandArgument="areaStr" runat="server" ForeColor="Blue">Area TECHADA</asp:LinkButton>
                </th>
                 <th id="Th3" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="areaStr" runat="server" ForeColor="Blue">Area OCUPADA</asp:LinkButton>
                </th>
                <th id="Th12" runat="server">
                    <asp:LinkButton ID="LinkButton12" CommandName="Sort" CommandArgument="areaStr" runat="server" ForeColor="Blue">Nro BAÑO</asp:LinkButton>
                </th>
                 <th id="Th13" runat="server">
                    <asp:LinkButton ID="LinkButton13" CommandName="Sort" CommandArgument="areaStr" runat="server" ForeColor="Blue">Nro DORMITORIOS</asp:LinkButton>
                </th>
                
               <th id="Th10" runat="server">
                    <asp:LinkButton ID="LinkButton10" CommandName="Sort" CommandArgument="precio" runat="server" ForeColor="Blue">PRECIO</asp:LinkButton>
                </th>
             
               
                
                <th id="Th5" runat="server">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" CommandArgument="bitActivo" runat="server">ACTIVO</asp:LinkButton>
                </th>
               
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
           <td width="90x">
               <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"codigo").ToString()%>'  
                 Target="_self"  ID="Hyperlink1"
                NavigateUrl='<%# "~/VentaAdmin/UI/UIReadForm.aspx?id=" + 
                                    DataBinder.Eval (Container.DataItem,"idInternal").ToString() +
                                    "&idProyecto="+ DataBinder.Eval (Container.DataItem,"idProyecto").ToString()%>' 
            />   
            </td>
             <td width="100px">

                 <%# Eval("tipoUIStr")%> <br />
            </td>
            <td width="100px">
                 <%# Eval("descripcion")%> 
            </td>

            <td width="150px" >
             <%# Eval("localizacionStr")%> -
                 <%# Eval("tipoBloqueStr")%> <br />
            </td>

            <td width="150px">

                 <%# Eval("etapaStr")%> <br />
            </td>
            

           
            
            <td  width="100px">

                 <%# Eval("estadoStr")%> <br />
            </td>
            

            <td width="100px" >

                 <%# Eval("tipoModeloStr")%> <br />
            </td>

          
                 
           <td width="100px" align="right">
                  <%# Eval("areaTechada")%> <br />
            </td>        
            <td width="100px" align="right">
                  <%# Eval("areaOcupada")%> <br />
            </td>  


            <td width="100px" align="right">
                  <%# Eval("nroBanio")%> <br />
            </td>        
            <td width="100px" align="right">
                  <%# Eval("nroDormitorio")%> <br />
            </td>  

            <td width="110px" align="right">

                 <%# Eval("precioStr")%> <br />
            </td> 

          
              <td>
                <input id="Checkbox1" type="checkbox" runat="server" checked= '<%# Eval("bitActivo")%>' disabled="disabled">
               <br />
            </td>

            <td>
              <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                     CommandArgument='<%# Eval("idInternal")%>' ImageUrl="../../Images/delete.gif" 
                     OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" />
            </td>
          
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" >
            <tr>
                <td>
                   <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>



</asp:Panel>

    
     